package com.tanhua.model.vo;


import com.tanhua.model.domian.Questions;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SoulVo implements Serializable {
    private String id;
    private String name;
    private String cover;
    private String level;
    private Integer star;
    private List<TitleVo> questions;
    private Integer isLock;
    private Long reportId;

    public static SoulVo init(Questions questions){
        SoulVo soulVo = new SoulVo();
        BeanUtils.copyProperties(questions, soulVo);
        soulVo.setId(questions.getId().toString());
        return soulVo;
    }
}
